{set:$paymentList=Api::run('getPaymentListByOnline')}
<section>
	<div class="pending-detial">


	<div class="panel panel-default">
		  <div class="panel-heading">
				<h3 class="panel-title">在线充值</h3>
		  </div>


		
		  

			  <div style="padding:10px">
				

				<form action="{url:/block/doPay}" method="POST" class="form-inline" role="form">
				
					<div class="form-group">
						<label class="sr-only" for="">label</label>
						<input type="text" name="recharge" class="form-control" id="" placeholder="金额">
					</div>
{if:$paymentList}

{foreach:items = $paymentList}
			<div class="form-group">			
				<label>

				<input type="radio" name="payment_id" id="input" value="{$item['id']}" >
					{$item['name']}
						{$item['note']}，手续费：{if:$item['poundage_type']==2}￥{$item['poundage']}{else:}{$item['poundage']}%{/if}
			</label>
		</div>

{/foreach}
{else:}
没有线上支付方式
{/if}

				
					
				
					<button type="submit" class="btn btn-primary" onclick='return check_form();'>确定充值</button>
				</form>
		  </div>
		
	</div>


	
	</div>
</section>

<script type='text/javascript'>
function check_form()
{
	if($('[name="payment_id"]:checked').length == 0)
	{
		alert('请选择支付方式');
		return false;
	}

	if($('[name="recharge"]').val() <= 0)
	{
		alert('要充值的金额必须大于0元');
		return false;
	}
}
</script>